<?php
/**
 * Created by litong on Date: 2018/12/23 0023 上午 11:02
 */
class Site{
  /*成员变量*/
  var $url;
  var $title;
  /*成员函数*/
  function setUrl($par){
    $this->url=$par;
  }

  function getUrl(){
    echo $this->url.PHP_EOL;
  }

  function setTitle($par){
    $this->title=$par;
  }

  function getTitile(){
    echo $this->title.PHP_EOL;
  }
}
$runoob=new Site();
$taobao=new Site();
$google=new Site();
$runoob->setTitle("runoob");
$runoob->setUrl("www.runoob.com");
$taobao->setTitle("taobao");
$taobao->setUrl("www.taobao.com");
$google->setTitle("google");
$google->setUrl("www.google.com");

$runoob->getTitile();
$runoob->getUrl();
$taobao->getTitile();
$taobao->getUrl();
$google->getTitile();
$google->getUrl();
?>